@extends('home/layout/master')
@section('title', $configs["cfg_title"])
@section('keywords', $configs["cfg_keywords"])
@section('description', $configs["cfg_description"])

@section('body')
    <article>
        <!--lbox begin-->
        <div class="lbox">
            <!--banbox begin-->
            <div class="banbox">
                <div class="banner">
                    <div id="banner" class="fader">
                        <li class="slide" ><img src="{{asset('/static/images/1.jpg')}}"></li>
                        <li class="slide" ><img src="{{asset('/static/images/2.jpg')}}"></li>
                        <li class="slide" ><img src="{{asset('/static/images/3.jpg')}}"></li>
                        <li class="slide" ><img src="{{asset('/static/images/4.jpg')}}"></li>
                        <div class="fader_controls">
                            <div class="page prev" data-target="prev"></div>
                            <div class="page next" data-target="next"></div>
                            <ul class="pager_list">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <!--banbox end-->
            <!--headline begin-->
            <div class="headline">
                <ul>
                    <li><a href="#" title="为什么说10月24日是程序员的节日？"><img src="{{asset('/static/images/h1.jpg')}}" alt="为什么说10月24日是程序员的节日？"><span>为什么说10月24日是程序员的节日？</span></a></li>
                    <li><a href="#" title="个人网站做好了，百度不收录怎么办？来，看看他们怎么做的。"><img src="{{asset('/static/images/h2.jpg')}}" alt="个人网站做好了，百度不收录怎么办？来，看看他们怎么做的。"><span>个人网站做好了，百度不收录怎么办？来，看看他们怎么做的。</span></a></li>
                </ul>
            </div>
            <!--headline end-->
            <div class="clearblank"></div>

            <div class="tab_box whitebg">

                <div class="tab_buttons">
                    <ul>
                        @foreach($head_type as $k=>$v)
                        <li class="{{ $k==0 ? 'newscurrent' : '' }}">{{ $v->name }}</li>
                        @endforeach
                    </ul>
                </div>
                <div class="newstab">
                    @foreach($ln_article_arr as $v)
                        <div class="newsitem">
                            <div class="newspic">
                                <ul>
                                    @foreach($v as $k2=>$v2)
                                        <?php if($k2 > 1){ break; } ?>
                                        <li><a href="{{ url('/article/'.$v2->id) }}"><img src="{{ empty($v2->picname) ? '/static/images/h2.jpg' : $v2->picname }}"><span>{{ $v2->title }}</span></a></li>
                                    @endforeach
                                </ul>
                            </div>
                            <ul class="newslist">
                                @foreach($v as $k2=>$v2)
                                    <li><i></i><a href="{{ url('/article/'.$v2->id) }}" title="{{ $v2->title }}">{{ $v2->title }}</a><p>{{ $v2->description }}</p></li>
                                @endforeach
                            </ul>
                        </div>
                    @endforeach
                </div>
            </div>

            <!--tab_box end-->
            <div class="zhuanti whitebg">
                <h2 class="htitle">
                    <span class="hnav">
                        @foreach($tagsData as $k=>$v)
                            <?php if($k>3){ break; } ?>

                            <a href="{{ url('/tag/'.$v->id) }}" target="_blank">{{ $v->name }}</a> &nbsp;
                            @endforeach
                    </span>特别推荐
                </h2>
                <ul>
                    @foreach($tj_data as $v)
                    <li> <i class="ztpic"><a href="{{ url('/article/'.$v->id) }}"><img src="{{ empty($v->picname) ? '/static/images/h1.jpg' : $v->picname }}"></a></i> <b>{{ $v->title }}</b><span>{{ $v->description }}</span><a href="{{ url('/article/'.$v->id) }}" class="readmore">文章阅读</a> </li>
                    @endforeach
                </ul>
            </div>

            <div class="ad whitebg"><a href='http://www.yangqq.com/download/div/917.html' target=_blank><img src="{{asset('/static/images/longad.jpg')}}"></a></div>
            <div class="whitebg bloglist">
                <h2 class="htitle">最新博文</h2>
                <ul>
                    @foreach($data as $k=>$v)
                    <li>
                        <h3 class="blogtitle"><b>【NEW】</b><a href="{{ url('/article/'.$v->id) }}" target="_blank">{{ $v->title }}</a></h3>
                        <span class="blogpic imgscale"><i><a href="{{ url('/type/'.$v->type_id) }}" target="_blank">{{ $v->types->name }}</a></i><a href="{{ url('/article/'.$v->id) }}" title="{{ $v->title }}"><img src="{{ empty($v->picname) ? '/static/images/75842f4d1e18d692a66c38eb172a40ab.jpg' : $v->picname }}" alt="{{ $v->title }}"></a></span>
                        <p class="blogtext">{{ $v->description }}</p>
                        <p class="bloginfo"><i class="avatar"><a href='#' target=_blank><img src="{{ !empty($v->users->face) ? $v->users->face : "/static/images/avatar.jpg" }}" border=0 width='30' height='30' alt=''></a></i><span></span><span>{{ date('Y-m-d', $v->addtime) }}</span><span>【<a href="{{ url('/type/'.$v->type_id) }}" target="_blank">{{ $v->types->name }}</a>】</span></p>
                        <a href="{{ url('/article/'.$v->id) }}" class="viewmore">阅读更多</a>
                    </li>
                        <?php if($k>12){ break; } ?>
                    @endforeach
                </ul>
            </div>
            <!--bloglist end-->
        </div>
        <div class="rbox">
            <div class="card">
                <h2>我的名片</h2>
                <p>网名：随心</p>
                <p>职业：PHP程序员</p>
                <p>现居：湖北省-武汉市</p>
                <p>Email：704061912@qq.com</p>
                <ul class="linkmore">
                    <li><a href="/" target="_blank" class="iconfont icon-zhuye" title="网站地址"></a></li>
                    <li><a href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&amp;email={{ $configs['cfg_email'] }}" target="_blank" class="iconfont icon-youxiang" title="我的邮箱"></a></li>
                    <li><a href="http://wpa.qq.com/msgrd?v=3&amp;uin={{ $configs['cfg_qq'] }}&amp;site=qq&amp;menu=yes" target="_blank" class="iconfont icon---" title="QQ联系我"></a></li>
                    <li id="weixin"><a href="#" target="_blank" class="iconfont icon-weixin" title="关注我的微信"></a><i><img src="{{asset('/static/images/wx.jpg')}}"></i></li>      </ul>
            </div>
            <div class="whitebg notice">
                <h2 class="htitle">最近更新</h2>
                <ul>
                    @foreach($data as $k=>$v)
                        <?php if($k>3){ break; } ?>
                        <li><a target="_blank"  href="{{ url('/article/'.$v->id) }}">{{ $v->title }}</a></li>
                    @endforeach
                </ul>
            </div>
            <div class="whitebg paihang">
                <h2 class="htitle">点击排行</h2>
                @foreach($articleClick as $k=>$v)
                    <section class="topnews imgscale"><a href="{{ url('/article/'.$v->id) }}"><img src="{{ empty($v->picname) ? '/static/images/b02.jpg' : $v->picname }}" alt="{{ $v->title }}" title="{{ $v->title }}"><span>{{ $v->title }}</span></a></section>
                    <?php if($k == 0){ break; } ?>
                @endforeach
                <ul>
                    @foreach($articleClick as $k=>$v)
                        <?php if($k == 0){ continue; } ?>
                        <li><i></i><a href="{{ url('/article/'.$v->id) }}" title="{{ $v->title }}" target="_blank">{{ $v->title }}</a></li>
                    @endforeach
                </ul>
            </div>
            <div class="whitebg tuijian">
                <h2 class="htitle">站长推荐</h2>
                @foreach($articlePraise as $k=>$v)
                    <section class="topnews imgscale"><a href="{{ url('/article/'.$v->id) }}"><img src="{{ empty($v->picname) ? '/static/images/2.jpg' : $v->picname }}" alt="{{ $v->title }}" title="{{ $v->title }}"><span>{{ $v->title }}</span></a></section>
                    <?php if($k == 0){ break; } ?>
                @endforeach
                <ul>
                    @foreach($articlePraise as $k=>$v)
                        <?php if($k == 0){ continue; } ?>
                        <li><a href="{{ url('/article/'.$v->id) }}" title="{{ $v->title }}" target="_blank"><i><img src="{{ empty($v->picname) ? '/static/images/2.jpg' : $v->picname }}"></i>
                                <p>{{ $v->title }}</p>
                            </a></li>
                    @endforeach
                </ul>
            </div>
            <div class="ad whitebg imgscale">
                <ul>
                    <a href='/' target=_blank><img src="{{asset('/static/images/ad.jpg')}}"></a>      </ul>
            </div>

            <div class="whitebg cloud">
                <h2 class="htitle">标签云</h2>
                <ul>
                    @foreach($tagsData as $v)
                        <a href="{{ url('/tag/'.$v->id) }}" target="_blank">{{ $v->name }}</a>
                    @endforeach
                    <a href="{{ url('/tags/') }}">所有标签</a>
                </ul>
            </div>

            <div class="whitebg wenzi">
                <h2 class="htitle">猜你喜欢</h2>
                <ul>
                    @foreach($data as $k=>$v)
                        <?php if($k<=12){ continue; } ?>
                    <li><a target="_blank"  href="{{ url('/article/'.$v->id) }}">{{ $v->title }}</a></li>
                    @endforeach
                </ul>
            </div>
            <div class="ad whitebg imgscale">
                <ul>
                    <a href='/' target=_blank><img src="{{asset('/static/images/ad02.jpg')}}"></a>      </ul>
            </div>
            <div class="whitebg cloud">
                <h2 class="htitle">专栏</h2>
                <ul>
                    @foreach($casesData as $v)
                        <a href="{{ url('/getcase/'.$v->id) }}" target="_blank">{{ $v->name }}</a>
                    @endforeach
                    <a href="{{ url('/cases/') }}">专栏列表</a>
                </ul>
            </div>
            <div class="links whitebg">
                <h2 class="htitle">友情链接</h2>
                <ul>
                    <li><a href="http://www.yangqq.com" target="_blank">个人博客模板</a></li>
                </ul>
            </div>
        </div>
    </article>
@endsection